import axiosApi from "./AxiosApi.js";

const apiList = {
  page: {
    url: `/xssc/sampleBloodCollect/queryByIds`,
    method: "POST"
  },
  save: {
    url: `/xssc/sampleBloodCollect`,
    method: "POST"
  },
  update: {
    url: `/xssc/sampleBloodCollect`,
    method: "PUT"
  },
  delete: {
    url: `/xssc/sampleBloodCollect`,
    method: "DELETE"
  }
};

const apiLists = {
  page: {
    url: `/xssc/sampleBloodNotCollect/page`,
    method: "POST"
  },
  save: {
    url: `/sampleBloodNotCollect`,
    method: "POST"
  },
  update: {
    url: `/xssc/sampleBloodNotCollect`,
    method: "PUT"
  },
  delete: {
    url: `/xssc/sampleBloodNotCollect`,
    method: "DELETE"
  },
  // 删除跨部门
  deleteByAllDept: {
    url: `/xssc/sampleBloodNotCollect/deleteByAllDept`,
    method: "DELETE"
  },
  // 删除本部门
  deleteByMyDept: {
    url: `/xssc/sampleBloodNotCollect/deleteByMyDept`,
    method: "DELETE"
  },
  // 归档查询
  openArchived: {
    url: `/xssc/sampleBloodNotCollect/openArchived`,
    method: "GET"
  },
  // 归档
  archived: {
    url: `/xssc/sampleBloodNotCollect/archived`,
    method: "POST"
  },
  // 导出
  export: {
    url: `/xssc/sampleBloodNotCollect/export`,
    responseType: "blob",
    method: "POST"
  },
  // 退款查询
  openRefundAudit: {
    url: `/xssc/sampleBloodNotCollect/openRefundAudit`,
    method: "GET"
  },
  // 退款
  refundAudit: {
    url: `/xssc/sampleBloodNotCollect/refundAudit`,
    method: "POST"
  },
  // 退款
  sampleList: {
    url: `/xssc/sampleBloodNotCollect/sampleList`,
    method: "GET"
  }
};

export default {
  page(data) {
    return axiosApi({
      ...apiList.page,
      // formData: true,
      data
    });
  },
  save(data) {
    return axiosApi({
      ...apiList.save,
      // formData: true,
      data
    });
  },
  update(data) {
    return axiosApi({
      ...apiList.update,
      // formData: true,
      data
    });
  },
  delete(data) {
    return axiosApi({
      ...apiList.delete,
      // formData: true,
      data
    });
  },
  //未采管理
  notpage(data) {
    return axiosApi({
      ...apiLists.page,
      // formData: true,
      data
    });
  },
  notsave(data) {
    return axiosApi({
      ...apiLists.save,
      // formData: true,
      data
    });
  },
  notupdate(data) {
    return axiosApi({
      ...apiLists.update,
      // formData: true,
      data
    });
  },
  notdelete(data) {
    return axiosApi({
      ...apiLists.delete,
      // formData: true,
      data
    });
  },
  notdeleteByAllDept(data) {
    return axiosApi({
      ...apiLists.deleteByAllDept,
      // formData: true,
      data
    });
  },
  notdeleteByMyDept(data) {
    return axiosApi({
      ...apiLists.deleteByMyDept,
      // formData: true,
      data
    });
  },
  notopenArchived(data) {
    return axiosApi({
      ...apiLists.openArchived,
      // formData: true,
      data
    });
  },
  notarchived(data) {
    return axiosApi({
      ...apiLists.archived,
      // formData: true,
      data
    });
  },
  notexport(data) {
    return axiosApi({
      ...apiLists.export,
      // formData: true,
      data
    });
  },
  refundAudit(data) {
    return axiosApi({
      ...apiLists.refundAudit,
      // formData: true,
      data
    });
  },
  openRefundAudit(data) {
    return axiosApi({
      ...apiLists.openRefundAudit,
      // formData: true,
      data
    });
  },
  sampleList(data) {
    return axiosApi({
      ...apiLists.sampleList,
      // formData: true,
      data
    });
  }
};
